{extend name="layout:layout" /}

{block name="title"}数据库备份{/block}

{block name="stylesheet"}
<link rel="stylesheet" href="__STATIC__/icheck/minimal/red.css">
<style>
    #backup_number,#backup_week{display: none}
</style>
{/block}

{block name="body"}
<div style="padding: 15px;">
    <fieldset class="layui-elem-field">
        <legend>系统管理 - 数据库备份设置</legend>
        <div class="layui-field-box">
            <div class="layui-btn-group">
                <button class="layui-btn layui-btn-xs dw-refresh">
                    <i class="layui-icon">&#x1002;</i>刷新
                </button>
            </div>
            <hr>
            <form class="layui-form" action="{:url('Backup/update')}">
                <div class="layui-form-item">
                    <label class="layui-form-label">类型</label>
                    <div class="layui-input-block">
                        {volist name="backupType" id="vo"}
                        {if condition="$key eq $list.type"}
                        <input type="radio" name="type" value="{$key}" title="{$vo}" lay-filter="backup_type" checked>
                        {else/}
                        <input type="radio" name="type" value="{$key}" title="{$vo}" lay-filter="backup_type">
                        {/if}
                        {/volist}
                    </div>
                </div>
                <div class="layui-form-item" id="backup_number">
                    <label class="layui-form-label">号数</label>
                    <div class="layui-input-inline">
                        <select name="number" lay-verify="required" lay-search="">
                            {volist name="backupNumb" id="vo"}
                            {if condition="$list.number eq $key"}
                            <option value="{$key}" selected>{$vo}</option>
                            {else/}
                            <option value="{$key}">{$vo}</option>
                            {/if}
                            {/volist}
                        </select>
                    </div>
                </div>
                <div class="layui-form-item" id="backup_week">
                    <label class="layui-form-label">星期</label>
                    <div class="layui-input-inline">
                        <select name="week" lay-verify="required">
                            {volist name="backupWeek" id="vo"}
                            {if condition="$list.number eq $key"}
                            <option value="{$key}" selected>{$vo}</option>
                            {else/}
                            <option value="{$key}">{$vo}</option>
                            {/if}
                            {/volist}
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">时间</label>
                    <div class="layui-input-inline">
                        <input type="text" name="back_time" lay-verify="required" class="layui-input back_time" value="{$list.back_time}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                    </div>
                </div>
            </form>
        </div>
    </fieldset>
</div>
{/block}
{block name="javascript"}
<script>
    var type = "{$list.type}";
</script>
<script type="text/javascript" src="__STATIC__/backend/javascript/backup.js"></script>
<script type="text/javascript" src="__STATIC__/backend/javascript/dw_form_submit.js"></script>
{/block}